<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
    const arr = [2,3,4,5,'a','b','c']
    // const newArr = arr.filter(item =>{
    //   return typeof item === 'string'
    // })
    // console.log(newArr);


    //声明函数，在Array数组的原型上声明一个函数，调用时，因为arr是数组，所以会到其原型对象上找，找我现在声明的myfilter
    Array.prototype.myfilter = function(){
      console.log(this);
    }

    //调用函数
    arr.myfilter((item)=>{
      return 
    }
    )


  </script>
</body>
</html>